/**
 * 
 */
package org.codesketch.collector.dao;

import org.codesketch.collector.domain.Record;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Quirno Brizi
 *
 */
@Repository
public class RecordRepositoryImpl implements RecordRepository {

	@Autowired
	@Qualifier("mongoTemplate")
	private transient MongoTemplate template;
	
	/* (non-Javadoc)
	 * @see org.codesketch.collector.dao.RecordRepository#store(org.codesketch.collector.domain.Record)
	 */
	@Override
	@Transactional(readOnly=false)
	public void store(Record record) {
		template.insert(record);
	}

}
